package com.yjc.drygoods.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yjc.common.utils.PageUtils;
import com.yjc.drygoods.product.entity.CategoryEntity;
import com.yjc.drygoods.product.vo.Catelog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author yjc
 * @email yjc19979401754@126.com
 * @date 2022-08-19 21:27:48
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void removeMenuByIds(List<Long> asList);

    Long[] findCatelogPath(Long attrGroupId);

    List<String> findCatelogNamePath(Long attrGroupId);

    void updateDetail(CategoryEntity category);

    /**
     * 获取所有一级分类
     *
     * @return
     */
    List<CategoryEntity> getCategoryLevel1();

    /**
     * 获取所有2级和3级菜单
     *
     * @return
     */
    Map<Long, List<Catelog2Vo>> getCategory2And3();

    List<CategoryEntity> listWithSpuTree();

    List<CategoryEntity> appListWithSpuTree();

    List<Long> findCatelogPathWithSpuId(Long spuId);
}

